import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/MainView.vue'
import AichatView from '@/views/AichatView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/aichat',
    name: 'aichat',
    component: AichatView
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL), // 添加历史模式配置
  routes // 路由配置
})

export default router